Add helper for getting array namespace from an array#1085
Add helper for getting array namespace from an array#1085
Conversation
|
Mandatory Tests Please make sure you run these tests via comment before you merge!
Optional Tests To run benchmarks you can use:
To run tests and benchmarks with the DaCe backend you can use:
To run test levels ignored by the default test suite (mostly simple datatest for static fields computations) you can use:
For more detailed information please look at CI in the EXCLAIM universe. |
| return np | ||
|
|
||
|
|
||
| def array_ns_from_array(array: NDArray) -> ModuleType: |
There was a problem hiding this comment.
| def array_ns_from_array(array: NDArray) -> ModuleType: | |
| def get_array_ns_from_array(array: NDArray) -> ModuleType: |
to keep in line with (Magda's?) get/compute/apply
There was a problem hiding this comment.
I must say I don't love adding get etc. everywhere, but I don't object. If you prefer adding it let's do it.
There was a problem hiding this comment.
In gt4py we recently introduced array_api_compat as a dependency which provides array_api_compat.array_namespace(array)
There was a problem hiding this comment.
|
implemented with |
Extracting from two PRs that implemented the same:
@jcanton I liked your implementation, but (slightly) prefer my name. Feel free to bikeshed.